use serde::{Deserialize, Serialize};
use serde_json::Value;
use std::path::PathBuf;
use std::fs::{ File};
#[derive(Deserialize, Debug)]
pub struct User {
    name: String,
    id: String,
    is_current: bool,
    image_id: String,
}

pub struct Paths {
    pub _user_path: String,
    pub _other_path: String,
    pub _log_path: String,
    pub _dir_image_path: String,
    pub _dir_file_path: String,
    pub _dir_image_user_path: String,
}

pub struct ChatMes {
    pub id: String,
    pub user_id: String,
    pub name: String,
    pub is_delete: String,
    pub url: String,
    pub image_type: String,
    pub mes_type: String,
    pub time: String,
    pub txt: String,
}

pub(crate) struct FileData {
   pub file: File,
   pub path: PathBuf,
   pub  name: Option<String>,
}

#[derive(Debug, Serialize)]
pub struct ImageData {
    pub name: String,
    pub imgtype: String,
    pub url: String,
    pub mes_type: String,
    pub user_id: Option<String>,
    pub base64_header:String
}

#[derive(Serialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct DataResponse {
    pub log: Value,
    pub images: Vec<ImageData>,
    pub user: Value,
    pub user_images: Vec<ImageData>,
}

